Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
fast-sourcemap-concat
Advanced tools
The fast-sourcemap-concat npm package is designed to concatenate multiple JavaScript files and generate source maps for them. This is particularly useful in build processes where you need to combine several files into one while maintaining the ability to debug the original source code.
Concatenate JavaScript files
This feature allows you to concatenate multiple JavaScript files into a single output file. The code sample demonstrates how to create a new Concat instance, add files to it, and then finalize the concatenation process.
const Concat = require('fast-sourcemap-concat');
const concat = new Concat({ outputFile: 'output.js' });
concat.addFile('file1.js');
concat.addFile('file2.js');
concat.end();
Generate source maps
This feature enables the generation of source maps while concatenating files. The code sample shows how to enable source map generation by setting the `sourceMap` option to true.
const Concat = require('fast-sourcemap-concat');
const concat = new Concat({ outputFile: 'output.js', sourceMap: true });
concat.addFile('file1.js');
concat.addFile('file2.js');
concat.end();
Add raw content
This feature allows you to add raw content directly to the concatenated output. The code sample demonstrates how to add a raw JavaScript snippet using the `addSpace` method.
const Concat = require('fast-sourcemap-concat');
const concat = new Concat({ outputFile: 'output.js' });
concat.addFile('file1.js');
concat.addFile('file2.js');
concat.addSpace('console.log("Hello World");');
concat.end();
The concat-with-sourcemaps package provides similar functionality for concatenating files and generating source maps. It is a lightweight alternative that focuses on simplicity and ease of use.
The gulp-concat package is a popular plugin for the Gulp build system that allows for file concatenation. It also supports source map generation when used in conjunction with other Gulp plugins.
The broccoli-concat package is a Broccoli plugin for concatenating files and generating source maps. It is designed to work within the Broccoli build system and offers similar functionality to fast-sourcemap-concat.
This library lets you concatenate files (with or without their own pre-generated sourcemaps), and get a single output file along with a sourcemap.
It was written for use in ember-cli via broccoli-sourcemap-concat.
We depend on mozilla's source-map library, but only to use their base64-vlq implementation, which is in turn based on the version in the Closure Compiler.
We can concatenate much faster than source-map because we are specifically optimized for line-by-line concatenation.
FAQs
Concatenate files while generating or propagating sourcemaps.
The npm package fast-sourcemap-concat receives a total of 155,777 weekly downloads. As such, fast-sourcemap-concat popularity was classified as popular.
We found that fast-sourcemap-concat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.